import request from '@/utils/request'

// 获取列表
export function getList(data) {
  return request({
    url: '/wms/production/input/list',
    method: 'post',
    data
  })
}
// 生产入库扫码
export function productionSelect(workOrderNumber) {
  return request({
    url: `/wms/production/select/${workOrderNumber}`,
    method: 'get'
  })
}

// 出库单和入库单模块 查仓库列表的接口(查询条件下拉列表使用)
export function queryRepositoriesIsolationList(params) {
  return request({
    url: '/wms/stocks/warehouse/isolation/list',
    method: 'get',
    params
  })
}

// 查询所有的仓库列表
export function queryAllWareHoseList () {
  return request({
    url: '/wms/stocks/warehouse/list',
    method: 'get'
  })
}


// 确认入库
export function saleAppReturnCompleted(data) {
  return request({
    url: `/wms/production/add/productReceiptDoc`,
    method: 'post',
    data
  })
}


// 销售退货入库获取详情
export function stockSaleAppReturnDetails(id) {
  return request({
    url: `/wms/stock/sale/app/return/details/${id}`,
    method: 'get'
  })
}

// 查询此单号是否是销售出库单
export function saleAppOutList(data) {
  return request({
    url: '/wms/stock/sale/app/out/list',
    method: 'post',
    data
  })
}

// 推荐批次
export function barCodeTrackListRecommend(params) {
  return request({
    url: `/wms/bar/code/track/list/recommend`,
    method: 'get',
    params
  })
}

// 查询审批的物料中，该库房不存在的物料列表
export function postExistStockMaterial(data) {
  return request({
    url: '/wms/stocks/exist/stock/material',
    method: 'post',
    data
  })
}

// 申请人列表
export function usersListCompanyEnabled() {
  return request({
    url: '/api/users/list/company/enabled',
    method: 'get'
  })
}
// 获取物料类型
export function materialsTypeList(data) {
  return request({
    url: '/api/v1/open/materials/common/type/list',
    method: 'post',
    data
  })
}

